
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Tryit Editor v1.6</title>
<link rel="stylesheet" type="text/css" href="/tryit.css" />
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<script type='text/javascript'>
(function() {
var useSSL = 'https:' == document.location.protocol;
var src = (useSSL ? 'https:' : 'http:') +
'//www.googletagservices.com/tag/js/gpt.js';
document.write('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>');
})();
</script>
<script type='text/javascript'>
googletag.defineSlot('/16833175/TopLeftRectangle', [170, 90], 'div-gpt-ad-1357907445241-0').addService(googletag.pubads());
googletag.defineSlot('/16833175/TryitLeaderboard', [728, 90], 'div-gpt-ad-1343810007679-6').addService(googletag.pubads());
googletag.pubads().setTargeting("content","tryhtml");
googletag.pubads().enableSyncRendering();
googletag.pubads().enableSingleRequest();
googletag.enableServices();
</script>
</head>
<body>
<div style="position:relative;width:100%;margin-top:0px;margin-bottom:0px;">
	<div style="width:903px;height:94px;position:relative;margin:0px;margin-left:auto;margin-right:auto;margin-top:5px;margin-bottom:5px;padding:0px;overflow:hidden;">
		<!-- TopLeftRectangle -->
		<div id='div-gpt-ad-1357907445241-0' style="float:left;width:170px; height:90px;">
			<script type='text/javascript'>
			googletag.cmd.push(function() { googletag.display('div-gpt-ad-1357907445241-0'); });
			</script>
		</div>
		<div style="width:733px;height:90px;overflow:hidden;">
			<!-- TryitLeaderboard -->
			<div id='div-gpt-ad-1343810007679-6' style='width:728px; height:90px; margin-left:5px;'>
				<script type='text/javascript'>
				googletag.display('div-gpt-ad-1343810007679-6');
				</script>
			</div>
		</div>
		<div style="clear:both"></div>
	</div>
</div>

<form style="margin:0px" action="tryit_view.asp" method="post" target="view" id="tryitform" name="tryitform" onsubmit="validateForm();">

<table border="0" class="maintable">
<tr>
<td width="50%">

<div class="result_header" style="float:left;width:200px;margin-top:8px;">Source Code:</div>
<input style="font-family:verdana;float:right;" type="button" value="Submit Code &raquo;" onclick="submitTryit()">
<div style="clear:both;"></div>

</td>
<td><div class="result_header" style="margin-top:8px;">Result:</div></td>
</tr>
<tr>
<td valign="top">

<textarea class="code_input" width="100%" height="400px" id="pre_code" wrap="logical">
<!DOCTYPE html>
<html>
<body>

<p>
<a href="default.asp">HTML Tutorial</a> This is a link to a page on this website.
</p>

<p>
<a href="http://www.w3.org/">W3C</a> This is a link to a website on the World Wide Web.
</p>

</body>
</html>

</textarea>
<input type="hidden" name="code" id="code" />
<input type="hidden" id="bt" name="bt" />

</td>
<td valign="top">
<iframe id="viewIFRAME" class="result_output" width="100%" height="400px" frameborder="0" name="view" src="tryit_view.asp?filename=tryhtml_links"></iframe>
<script>
function resizeHeight(elmnt)
{
if (window)
	{
	var x=window.innerHeight
	if (x)
		{
		var y=(x-205);
		if (y>400)
			{
			document.getElementById("pre_code").style.height=y + "px";
			document.getElementById("viewIFRAME").style.height=y + "px";
			}
		}
	}
}
resizeHeight()
window.onresize=function(){resizeHeight()}
</script>
</td>
</tr>
<tr>
<td align="left" class="bottomtext">
Edit the code above and click "Submit Code" to see the result.
</td>
<td align="right" class="bottomtext">
<a style="color:#617f10" href="http://www.w3schools.com">W3Schools.com</a> - Try it yourself&nbsp;
</td>
</tr>
</table>

	</form>

<script type="text/javascript">
function submitTryit()
{
var t=document.getElementById("pre_code").value;
t=t.replace(/=/gi,"w3equalsign");
var pos=t.search(/script/i)
while (pos>0)
	{
	t=t.substring(0,pos) + "w3" + t.substr(pos,3) + "w3" + t.substr(pos+3,3) + "tag" + t.substr(pos+6);
	pos=t.search(/script/i);
	}
	
document.getElementById("code").value=t;
document.getElementById("tryitform").action="tryit_view.asp?x=" + Math.random();
validateForm();
document.getElementById("tryitform").submit();
}
function validateForm()
{
var code=document.getElementById("code").value;
if (code.length>5000)
	{
	document.getElementById("code").value="<h1>Error</h1>";
	}
}

submitTryit()
</script>
</body>
</html>
